core

Core functionality.

source

blur_faces_video

 blur_faces_video (model, video, conf=0.3, h_factor=0.5, kernel=35,
                   step=3)

source

enumerate2

 enumerate2 (xs, start=0, step=1)

source

blur

 blur (img, coords, kernel=35)

source

get_face_coords

 get_face_coords (model, img, conf=0.3, h_factor=0.5)

source

detect_obstacles_3

 detect_obstacles_3 (model, img, targets=[], alert=True, h_limit=1024,
                     show=False, box_thicknes=7, avoidance_x=0,
                     avoidance_y=0.5, avoidance_w=0.5, avoidance_h=0.5,
                     obj_h_limit=0.5, conf=0.3, overlap_limit=0,
                     color='red')

source

distance_to_camera

 distance_to_camera (width, focal_len, pixel_width)

source

box_overlap

 box_overlap (box1, box2, limit=0)

source

obj_detect

 obj_detect (model, img, conf=0.3, iou=0.45, agnostic=False,
             multi_label=False, max_det=1000)

source

obj_model

 obj_model ()

Blurring faces in a video

model = obj_model()
v = mp.VideoFileClip('../videos/coffee.mp4')
v2 = blur_faces_video(model, v, conf=0.3, h_factor=0.6, kernel=75, step=5)
v2.ipython_display()
Moviepy - Building video __temp__.mp4.
Moviepy - Writing video __temp__.mp4
                                                               
Moviepy - Done !
Moviepy - video ready __temp__.mp4